package com.netrust.quarz.utils.http;

public class ResultUtils {
	@SuppressWarnings({ "unchecked", "rawtypes" })
	public static Result success(Object obj) {
		Result result =new Result();
		result.setCode(ResultEnums.success.getCode());
		result.setMsg(ResultEnums.success.getMsg());
		result.setData(obj);
		
		return result;
	}
	
	@SuppressWarnings({"rawtypes" })
	public static Result success() {
		return success(null);
	}
	
	@SuppressWarnings({"rawtypes" })
	public static Result error(Integer code,String msg) {
		Result result =new Result();
		result.setCode(code);
		result.setMsg(msg);
		return result;
	}
}
